home *** CD-ROM | disk | FTP | other *** search
/ Hackers Underworld 2: Forbidden Knowledge / Hackers Underworld 2: Forbidden Knowledge.iso / VIRUS / VIRS < prev    next >
Text File  |  1989-10-11  |  12KB  |  224 lines

  1. ////////////////////////////////////////////////////////////////////////////
  2. from Meridian Systems, Haslett (Lansing), Michigan
  3. multi-line service
  4. Dr. Gordon Williams sysop (517) 339-3783
  5.                           (517) 339-0091, etc., overflow
  6.  
  7. Meridian systems serves as the format for State Senator William Sederburg's
  8. "Political Forum".  Dr. Williams and Dr. Ken Salzman host a Human Services 
  9. Forum.  Dr. Glenn Keeney of MSU's Computer Science department hosts discussion 
  10. of programming and provides downloads from "Computer Language" and "AI Expert" 
  11. magazines. 
  12.  
  13. UPCO is a local computer user group that contracted BBS services in order to 
  14. support their club.  Message base 8 was opened for discussion of viruses. 
  15.  
  16. Lawrence Kestenbaum served as a County Commissioner for several years before 
  17. moving on to grad school at Cornell.  He provided a copy of the Jerusalem B 
  18. virus.
  19.  
  20. Mike Marotta (:-) is a technical writer.  His works have appeared in magazines 
  21. for IBM and Data General users, Defense Computing, Plan & Print, etc.  He is 
  22. the author of a book on codes and ciphers. 
  23. \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
  24.  
  25. Msg#:39943 *UPCO Discussion*
  26. 09-24-89 13:03:21
  27. From: MIKE MAROTTA
  28.   To: LAWRENCE KESTENBAUM (Rcvd)
  29. Subj: JERUSALEM B
  30. I spent the morning with Jerusalem B and these are my preliminary results.
  31.         Naturally, I made backups, etc.  I even made a new DOS diskette to use.
  32. I gathered to this diskette some utilities such as LW86 (displays assembler 
  33. mnemonics and their syntax), CALC (for hex arithmetic), LIST and BROWSE, 
  34. FSDEBUG and plain old DEBUG, etc.  I used the infected files to build a "dirty"
  35. diskette with NU.EXE, COMP, and some of my own COM and EXE programs.  XDIR.EXE 
  36. was written in C by a friend of mine.  I wrote RED.COM, BLUE.COM and 
  37. PRTSCR.COM.  RED and BLUE are 32 bytes each and change the screen colors. 
  38. PRTSCR is 4 bytes and does a "print screen".
  39.         I found that NU.EXE reaches a top limit of 155k bytes (started at 
  40. 148K).  About 5 re-infections seems to be the limit.  COM files were infected 
  41. just once each.  Re-infection, growth in file size) did not occur.
  42.         Here's what I see happening.  You run a dirty program.  It goes to 
  43. MEMORY and alters the image of COMMAND.COM.  When you run a clean program, it 
  44. gets infected.  When the date is Oct 13, 1989 and you run an EXE or a COM, the 
  45. file deletes itself.  Some of these (XDIR, e.g.) ran once on "Oct 13" but then 
  46. erased themselves on the second call.
  47.         Here is what is NOT happening.  You run a dirty program and it infects 
  48. all COM and EXE files.  I ran NU.EXE time after time.  WHile NU got bigger, 
  49. nothing else did.
  50.         If you run a clean program AFTER a dirty program has been run, the 
  51. clean program gets infected.
  52.         Because PRTSCR.COM, etc., are so small, I'll know in a few spare time 
  53. hours, just what the viral code is.  (more later)
  54.  
  55.  
  56. Msg#:39950 *UPCO Discussion*
  57. 09-25-89 01:05:45
  58. From: MIKE MAROTTA
  59.   To: LAWRENCE KESTENBAUM (Rcvd)
  60. Subj: JERUSALEM B
  61. (Jesuralem is also easy to type and it even contains JESU...)
  62. *
  63.         I spent a total of 8 hours with JB, drank a beer, passed out and here I
  64. am 6 hours later.  Some details.  EXEs keep getting infected, at least some of 
  65. them can.  COMs get infected once.  I wrote a program to output the letter A. 
  66. As a COM file it grew once.   The program to output the letter Z, left as an 
  67. EXE grew until it crashed.  (CLean it took only 32 bytes.  Maybe the small 
  68. size, you see.)  Now, ATTRIB.EXE grows forever, but it starts at, what? 6K? I 
  69. got it up to 22K and still hoggin'.  The increment is 1808 bytes.
  70. *
  71.         I listed the disassembled code (hope that doesn't violate the implicit 
  72. contract I entered into when I took the diskette out of the sleeve) via 
  73. DIS86PC.  (Some work here...Data and Code being equal, DIS86PC had some 
  74. interesting opinions about how to "execute" the "program fragment" COMMAND.COM)
  75. The virus opens with a JUMP, so I took it from that argument, byte 195 forward.
  76. *
  77.         I found the TSR function, a DATE function, lots of read and write 
  78. functions, a few interrrupt vectors and lots of calls to memory locations near 
  79. 0000:0000 to 0000:001F.  (Oddly enough the DATE checks only for the YEAR 1987. 
  80. I have yet to find 0A 0D = 10 13 but we'll see what tomorrow brings.)
  81.         You know that looks a lot like 0D 0A, the CR LF pair ...
  82.  
  83.  
  84. Msg#:39952 *UPCO Discussion*
  85. 09-25-89 01:48:18
  86. From: MIKE MAROTTA
  87.   To: GORDON WILLIAMS (Rcvd)
  88. Subj: VIRUS, CONT.
  89. I just rebooted and set the date to January 13th.  (also a Friday) and the two 
  90. executables I ran deleted themselves.
  91. *
  92. The Jerusalem B virus looks for and sets the file attributes with function 43 
  93. of INT 21.
  94.  
  95. Msg#:39958 *UPCO Discussion*
  96. 09-25-89 18:58:45
  97. From: MIKE MAROTTA
  98.   To: LAWRENCE KESTENBAUM (Rcvd)
  99. Subj: JERUSALEM B
  100. (It's getting easier to type Jerusalem... Let's hope no one invents a 
  101. Massachusetts or Connecticut virus...Then there's Azerbaidzhan and don't forget
  102. Armenia's important city, Ordzhonikidze  though perhaps virus wars would be 
  103. preferable to ethnic rioting...)
  104. *
  105.         I found where JB looks for date and day.  I'm  about 2/3 through now 
  106. and I must say, I have respect for the programmer.  Error trapping and 
  107. failsafes all over the place.  The guy knows how to save a byte, also.  If he 
  108. knew that the argument for a call is something, he moves the whole word into AX
  109. instead of MOV AH,12 and MOV AL,34.  He likes to PUSH and POP.  This is the 
  110. "real programmer's" way.  Me, I just MOV in again what I wished I'd PUSHed. 
  111. The program checks for disk type, and of course, changes the ATTRIButes of the 
  112. file.  Lots of error trapping. And it's TSR.  Neat.
  113. *
  114.         Now the next phase is to write a counter-program.  One that looks in 
  115. these places for this and that code and if the code is there, then you change 
  116. it so it's harmless. I already wrote some of this.  I have a program called 
  117. FOXY that goes to COMMAND.COM on a floppy and changes the program with no 
  118. alteration in size or date.  After being acted upon by FOXY, COMMAND.COM boots 
  119. with a message: "I am alive and I have rights."
  120. *
  121.         By the way, the monstrous size of ATTRIB (now at 66K) indicates 
  122. Jerusalem B does NOT write to the "slack" area of a file.  That in itself is a 
  123. challenge.  You can't do all that error trapping in a 256 bytes. Also, the 
  124. reason that FOXY acts only on floppies (and B: at that!) is to avoid just such 
  125. hassles.  The program is 32 bytes long and only because I allowed dead space 
  126. between the code and the message. I could still tighten it up...  But that 
  127. would leave maybe  16 bytes for error trapping.
  128.  
  129. Msg#:40038 *UPCO Discussion*
  130. 10-01-89 09:33:31
  131. From: MIKE MAROTTA
  132.   To: VIRUS HUNTERS
  133. Subj: JERUSALEM B, CONT.
  134. I must be making progress, I now have more questions than answers....
  135. .       sUMsDos is the virus identifier tag.  At least this string appears at 
  136. the head and tail.  Of course, we have seen that EXE files are always 
  137. re-infected, so this mechanism is not perfect.  Also, near the tail of the 
  138. virus is the string EDLIN.  
  139.         I looked at EDLIN and it has a lot of open space, most of it at the end
  140. of the file.  In all, EDLIN has about 2500 bytes available.  The Jerusalem B 
  141. virus runs 1808 bytes.  (This is hardcoded into the virus in several places, 
  142. e.g., MOV CX,0710 before an INT 21 function call.)  I wonder if EDLIN.COM was 
  143. the first host, or perhaps the first intended host.  
  144.         The string COMMAND.COM also shows up.  However, infection of 
  145. COMMAND.COM doesn't go well.  Mine crashed when I tried to invoke another DOS 
  146. shell.
  147.         It has been suggested that JB does NOT infect COMMAND.COM in order to 
  148. make it less detectable, especially asfter the discovery of the "40th 
  149. Anniversary Virus" which infected the command processor.
  150.         I have expressed by admiration for the great attention given to detail 
  151. in JB, but now I'm not so sure it is all necessary.  Now that I have worked my 
  152. way 100% thru the disassembly, I find many block of